package com.atguigu.day16.array02;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import java.util.Arrays;

/**
 * @version 1.0
 * @Author 马冰
 * @Date 2024/11/19 15:23
 * @注释
 */
public class Student  implements Comparable<Student> {
    String name;
    int age;
    double score;

    public Student(String name, int age, double score) {
        this.name = name;
        this.age = age;
        this.score = score;
    }

    @Override
    public String toString() {
        return "Strdent [name=" + name + ", age=" + age + ", score=" + score + "]";
    }

    @Override
    public int compareTo(Student o) {
        return this.age - o.age;
    }
}

